<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>views</title>
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=s0WXyAMDZRCfMPUoRKqv6d0o0Tivg7Rn&s=1"></script>
  <script>
    var userAgent = navigator.userAgent;

  if(userAgent.indexOf("OPR") > -1){
      //Opera浏览器，因为Opera浏览器的userAgent也有Chrome和Safari，所以要写在前面
      console.log("Opera");
  }else if(userAgent.indexOf("Version") > -1 && userAgent.indexOf("Safari") > -1){
      //没有更好的办法判断Safari浏览器，只能通过version（版本号）的英文来判断，因为别的浏览器版本号不是这样写的
      console.log("Safari");
  }else if(userAgent.indexOf("Edge") > -1){
      //Edge
      console.log("Edge");
  }else if(userAgent.indexOf("Chrome") > -1){
      //谷歌浏览器也有可能是使用Chrome内核的其他浏览器
      console.log("Chrome");
  }else if(userAgent.indexOf("Firefox") > -1){
      //火狐浏览器
      console.log("Firefox");
  }else if(userAgent.indexOf("rv:11") > -1){
      //ie11
      console.log("IE 11.0");
  }else if(userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE 10.0") > -1){
      //IE 10.0
      console.log("IE 10.0");
  }else if(userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE 9.0") > -1){
      //IE 9.0
      console.log("IE 9.0");
  }else if(userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE 8.0") > -1){
      //IE 8.0
      window.location.href='/browser_support';
      console.log("IE 8.0");
  }else if(userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE 7.0") > -1){
      //IE 7.0
      window.location.href='/browser_support';
      console.log("IE 7.0");
  }
    console.log(navigator.userAgent);
  </script>
  </head>
  <body>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
